package com.fish.anne.service.impl;

import java.util.List;

import com.fish.anne.dao.OrderDao;
import com.fish.anne.model.Order;
import com.fish.anne.service.OrderManager;
import com.fish.anne.webapp.formbean.OrderSearch;

 public class OrderManagerImpl extends GenericManagerImpl<Order, Long> implements OrderManager {
    OrderDao orderDao;

    public OrderManagerImpl(OrderDao orderDao) {
        super(orderDao);
        this.orderDao = orderDao;
    }

    
   

	public List<Order> find(OrderSearch orderSearch) {
		// TODO Auto-generated method stub
		return this.orderDao.find(orderSearch);
	}

	public Long getCountBySearch(OrderSearch orderSearch) {
		// TODO Auto-generated method stub
		return this.orderDao.getCountBySearch(orderSearch);
	}
	
	public void updateStatus(Order order){
		this.orderDao.updateStatus(order);
	}
	 public List<Order> getOrderByUserId(Long userId){
	    	List<Order> list = orderDao.getOrderByMemberId(userId);
	    	return list;
	    }
	    
	    public void deleteOrder(Long orderId){
	    	orderDao.deleteOrder(orderId);
	    	
	    }

}